<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShadowSocksLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shadow_socks_log', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('status')->unsigned()->default(0)->comment("0 info,1 error,2 warning");
            $table->string('server_host', 100)->default("");
            $table->string('client_host', 100)->default("");
            $table->string('message', 100)->default("")->comment("not info message");
            $table->timestamp('required_at')->nullable()->comment("request time");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shadow_socks_log');
    }
}
